<!doctype html>

<html>

  <head>
    <meta charset="utf-8">
    <title>WASM validate() test</title>
  </head>

  <body>
    <script>
      fetch("simple.wasm").then(response =>
        response.arrayBuffer()
      ).then(bytes => {
        const isValid = WebAssembly.validate(bytes);
        console.log(`The given bytes ${isValid ? "are" : "are not"} a valid wasm module`);
      });
    </script>
  </body>

</html>
